<!doctype html>
<html class="default no-js">
<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<title>ContextMenuTool | GoJS API</title>
	<meta name="description" content="Documentation for GoJS API">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<link rel="stylesheet" href="../../assets/css/style.css">
	<link rel="stylesheet" href="../assets/css/main.css">
	<script async src="../assets/js/search.js" id="search-script"></script>
</head>
<body>
<header>
	<nav id="navTop" class="w-full z-30 top-0 text-white bg-nwoods-primary">
		<div class="w-full container max-w-screen-lg mx-auto flex flex-wrap sm:flex-nowrap items-center justify-between mt-0 py-2">
			<div class="md:pl-4">
				<a class="text-white hover:text-white no-underline hover:no-underline
				font-bold text-2xl lg:text-4xl rounded-lg hover:bg-nwoods-secondary" href="../../index.html">
				<h1 class="mb-0 p-1 leading-none">GoJS</h1>
				</a>
			</div>
			<button id="topnavButton" class="rounded-lg sm:hidden focus:outline-none focus:ring" aria-label="Navigation">
				<svg fill="currentColor" viewBox="0 0 20 20" class="w-6 h-6">
					<path id="topnavOpen" fill-rule="evenodd" d="M3 5a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 10a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM9 15a1 1 0 011-1h6a1 1 0 110 2h-6a1 1 0 01-1-1z" clip-rule="evenodd"></path>
					<path id="topnavClosed" class="hidden" fill-rule="evenodd" d="M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z" clip-rule="evenodd"></path>
				</svg>
			</button>
			<div id="topnavList" class="hidden sm:block items-center w-auto mt-0 text-white p-0 z-20">
				<ul class="list-reset list-none font-semibold flex justify-end flex-wrap sm:flex-nowrap items-center px-0 pb-0">
					<li class="p-1 sm:p-0"><a class="topnav-link" href="../../learn/index.html">Learn</a></li>
					<li class="p-1 sm:p-0"><a class="topnav-link" href="../../samples/index.html">Samples</a></li>
					<li class="p-1 sm:p-0"><a class="topnav-link" href="../../intro/index.html">Intro</a></li>
					<li class="p-1 sm:p-0"><a class="topnav-link" href="../../api/index.html">API</a></li>
					<li class="p-1 sm:p-0"><a class="topnav-link" href="https://www.nwoods.com/products/register.html">Register</a></li>
					<li class="p-1 sm:p-0"><a class="topnav-link" href="../../download.html">Download</a></li>
					<li class="p-1 sm:p-0"><a class="topnav-link" href="https://forum.nwoods.com/c/gojs/11">Forum</a></li>
					<li class="p-1 sm:p-0"><a class="topnav-link" href="https://www.nwoods.com/contact.html"
					target="_blank" rel="noopener" onclick="getOutboundLink('https://www.nwoods.com/contact.html', 'contact');">Contact</a></li>
					<li class="p-1 sm:p-0"><a class="topnav-link" href="https://www.nwoods.com/sales/index.html"
					target="_blank"rel="noopener" onclick="getOutboundLink('https://www.nwoods.com/sales/index.html', 'buy');">Buy</a></li>
				</ul>
			</div>
		</div>
		<hr class="border-b border-gray-600 opacity-50 my-0 py-0" />
	</nav>
	<div class="tsd tsd-page-header">
		<div class="tsd-page-toolbar">
			<div class="w-full max-w-screen-xl mx-auto px-2">
				<div class="table-wrap">
					<div class="table-cell" id="tsd-search" data-index="../assets/js/search.json" data-base="..">
						<div class="field">
							<label for="tsd-search-field" class="tsd-widget search no-caption">Search</label>
							<input id="tsd-search-field" type="text" />
						</div>
						<ul class="results">
							<li class="state loading">Preparing search index...</li>
							<li class="state failure">The search index is not available</li>
						</ul>
						<a href="../index.html" class="title">GoJS API</a>
					</div>
					<div class="table-cell" id="tsd-widgets">
						<div id="tsd-filter">
							<a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a>
							<div class="tsd-filter-group">
								<div class="tsd-select" id="tsd-filter-visibility">
									<span class="tsd-select-label">All</span>
									<ul class="tsd-select-list">
										<li data-value="public">Public</li>
										<li data-value="protected">Public/Protected</li>
										<li data-value="private" class="selected">All</li>
									</ul>
								</div>
							</div>
						</div>
						<a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a>
					</div>
				</div>
			</div>
		</div>
		<div class="tsd tsd-page-title">
			<div class="w-full max-w-screen-xl mx-auto px-2">
				<div class="top-copyright">
					<b>GoJS</b>&reg; Diagramming Components<br/>version 2.1.56<br/>by <a href="https://www.nwoods.com/">Northwoods Software&reg;</a>
				</div>
				<div>
					<h1>Class ContextMenuTool</h1>
				</div>
			</div>
		</div>
	</div>
</header>
<div class="tsd w-full max-w-screen-xl mx-auto pb-4">
	<div class="row px-2 w-full">
		<div class="col-8 col-content">
			<section class="tsd-panel tsd-hierarchy">
				<h3>Hierarchy</h3>
				<ul class="tsd-hierarchy">
					<li>
						<a href="Tool.html" class="tsd-signature-type" data-tsd-kind="Class">Tool</a>
						<ul class="tsd-hierarchy">
							<li>
								<span class="target">ContextMenuTool</span>
							</li>
						</ul>
					</li>
				</ul>
			</section>
			<section class="tsd-panel tsd-comment">
				<div class="tsd-comment tsd-typography">
					<p>The ContextMenuTool is used to create and show a context menu.
					It automatically disables any browser context menu.</p>
					<p>Define context menus on individual <a href="GraphObject.html">GraphObject</a>s by setting <a href="GraphObject.html#contextMenu">GraphObject.contextMenu</a>.
					Define a context menu for the diagram background by setting <a href="Diagram.html#contextMenu">Diagram.contextMenu</a>.</p>
					<p>This tool is a standard mouse-down tool, the <a href="ToolManager.html#contextMenuTool">ToolManager.contextMenuTool</a>.</p>
					<p>This tool does not utilize any tool handles.
						This tool does not modify the model or conduct any transaction,
					although any code invoked by context menu commands might do so.</p>
					<p>There are examples of customizing this tool in the
						<a href="../../samples/customContextMenu.html">Custom Context Menu</a> and
					<a href="../../samples/htmlLightBoxContextMenu.html">HTML LightBox Context Menu</a> samples.</p>
					<p>If you want to programmatically show a context menu for a particular GraphObject or for the
						whole diagram, call <a href="CommandHandler.html#showContextMenu">CommandHandler.showContextMenu</a>.
					That command method is also invoked by the Menu key on the keyboard.</p>
					<p>Normally this shows a context menu (if available) on a right-mouse-up event.
						If you want it to happen on a right-mouse-down event, you&#39;ll need to move this tool
					from the <a href="ToolManager.html#mouseUpTools">ToolManager.mouseUpTools</a> list to the <a href="ToolManager.html#mouseDownTools">ToolManager.mouseDownTools</a> list:</p>
					<pre><code class="language-js"><span style="color: #9CDCFE">myDiagram</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">toolManager</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">mouseDownTools</span><span style="color: #D4D4D4">.</span><span style="color: #DCDCAA">add</span><span style="color: #D4D4D4">(</span><span style="color: #9CDCFE">myDiagram</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">toolManager</span><span style="color: #D4D4D4">.</span><span style="color: #DCDCAA">replaceTool</span><span style="color: #D4D4D4">(</span><span style="color: #CE9178">&quot;ContextMenu&quot;</span><span style="color: #D4D4D4">, </span><span style="color: #569CD6">null</span><span style="color: #D4D4D4">));</span>
</code></pre>
				</div>
			</section>
			<section class="tsd-panel-group tsd-index-group">
				<h2>Index</h2>
				<section class="tsd-panel tsd-index-panel">
					<div class="tsd-index-content">
						<section class="tsd-index-section ">
							<h3>Constructors</h3>
							<ul class="tsd-index-list">
								<li class="tsd-kind-constructor tsd-parent-kind-class tsd-is-overwrite"><a href="ContextMenuTool.html#constructor" class="tsd-kind-icon">constructor</a></li>
							</ul>
						</section>
						<section class="tsd-index-section ">
							<h3>Properties</h3>
							<ul class="tsd-index-list">
								<li class="tsd-kind-accessor tsd-parent-kind-class"><a href="ContextMenuTool.html#currentContextMenu" class="tsd-kind-icon">current<wbr>Context<wbr>Menu</a></li>
								<li class="tsd-kind-accessor tsd-parent-kind-class"><a href="ContextMenuTool.html#currentObject" class="tsd-kind-icon">current<wbr>Object</a></li>
								<li class="tsd-kind-accessor tsd-parent-kind-class"><a href="ContextMenuTool.html#defaultTouchContextMenu" class="tsd-kind-icon">default<wbr>Touch<wbr>Context<wbr>Menu</a></li>
								<li class="tsd-kind-get-signature tsd-parent-kind-class"><a href="ContextMenuTool.html#mouseDownPoint" class="tsd-kind-icon">mouse<wbr>Down<wbr>Point</a></li>
							</ul>
						</section>
						<section class="tsd-index-section ">
							<h3>Methods</h3>
							<ul class="tsd-index-list">
								<li class="tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"><a href="ContextMenuTool.html#canStart" class="tsd-kind-icon">can<wbr>Start</a></li>
								<li class="tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"><a href="ContextMenuTool.html#doActivate" class="tsd-kind-icon">do<wbr>Activate</a></li>
								<li class="tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"><a href="ContextMenuTool.html#doMouseDown" class="tsd-kind-icon">do<wbr>Mouse<wbr>Down</a></li>
								<li class="tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"><a href="ContextMenuTool.html#doMouseMove" class="tsd-kind-icon">do<wbr>Mouse<wbr>Move</a></li>
								<li class="tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"><a href="ContextMenuTool.html#doMouseUp" class="tsd-kind-icon">do<wbr>Mouse<wbr>Up</a></li>
								<li class="tsd-kind-method tsd-parent-kind-class"><a href="ContextMenuTool.html#findObjectWithContextMenu" class="tsd-kind-icon">find<wbr>Object<wbr>With<wbr>Context<wbr>Menu</a></li>
								<li class="tsd-kind-method tsd-parent-kind-class"><a href="ContextMenuTool.html#hideContextMenu" class="tsd-kind-icon">hide<wbr>Context<wbr>Menu</a></li>
								<li class="tsd-kind-method tsd-parent-kind-class"><a href="ContextMenuTool.html#hideDefaultContextMenu" class="tsd-kind-icon">hide<wbr>Default<wbr>Context<wbr>Menu</a></li>
								<li class="tsd-kind-method tsd-parent-kind-class"><a href="ContextMenuTool.html#positionContextMenu" class="tsd-kind-icon">position<wbr>Context<wbr>Menu</a></li>
								<li class="tsd-kind-method tsd-parent-kind-class"><a href="ContextMenuTool.html#showContextMenu" class="tsd-kind-icon">show<wbr>Context<wbr>Menu</a></li>
								<li class="tsd-kind-method tsd-parent-kind-class"><a href="ContextMenuTool.html#showDefaultContextMenu" class="tsd-kind-icon">show<wbr>Default<wbr>Context<wbr>Menu</a></li>
							</ul>
						</section>
					</div>
				</section>
			</section>
			<section class="tsd-panel-group tsd-member-group ">
				<h2>Constructors</h2>
				<section class="tsd-panel tsd-member tsd-kind-constructor tsd-parent-kind-class tsd-is-overwrite">
					<a name="constructor" class="tsd-anchor"></a>
					<h3>
						constructor
					</h3>
					<ul class="tsd-signatures tsd-kind-constructor tsd-parent-kind-class tsd-is-overwrite">
						<li class="tsd-signature tsd-kind-icon">new <wbr>Context<wbr>Menu<wbr>Tool<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="ContextMenuTool.html" class="tsd-signature-type" data-tsd-kind="Class">ContextMenuTool</a></li>
					</ul>
					<ul class="tsd-descriptions">
						<li class="tsd-description">
							<div class="tsd-comment tsd-typography">
								<p>You do not normally need to create an instance of this tool
								because one already exists as the <a href="ToolManager.html#contextMenuTool">ToolManager.contextMenuTool</a>, which you can modify.</p>
								<p>The <a href="Tool.html#name">Tool.name</a> of this tool is &quot;ContextMenu&quot;.</p>
							</div>
							<h4 class="tsd-returns-title">Returns <a href="ContextMenuTool.html" class="tsd-signature-type" data-tsd-kind="Class">ContextMenuTool</a></h4>
						</li>
					</ul>
				</section>
			</section>
			<section class="tsd-panel-group tsd-member-group ">
				<h2>Properties</h2>
				<section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class">
					<a name="currentContextMenu" class="tsd-anchor"></a>
					<h3>
						current<wbr>Context<wbr>Menu
					<span class="tsd-signature-symbol">: </span><a href="Adornment.html" class="tsd-signature-type" data-tsd-kind="Class">Adornment</a><span class="tsd-signature-symbol"> | </span><a href="HTMLInfo.html" class="tsd-signature-type" data-tsd-kind="Class">HTMLInfo</a>        </h3>
					<ul class="tsd-descriptions">
						<li class="tsd-description">
							<div class="tsd-comment tsd-typography">
								<p>Gets or sets the currently showing context menu, or null if there is none.
									This is typically only set in <a href="ContextMenuTool.html#showContextMenu">showContextMenu</a> and not by the user.
								It is also typically set to null in <a href="ContextMenuTool.html#hideContextMenu">hideContextMenu</a>.</p>
							</div>
						</li>
					</ul>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class">
					<a name="currentObject" class="tsd-anchor"></a>
					<h3>
						current<wbr>Object
					<span class="tsd-signature-symbol">: </span><a href="GraphObject.html" class="tsd-signature-type" data-tsd-kind="Class">GraphObject</a>        </h3>
					<ul class="tsd-descriptions">
						<li class="tsd-description">
							<div class="tsd-comment tsd-typography">
								<p>Gets or sets the <a href="GraphObject.html">GraphObject</a> found at the mouse point that has a context menu.
									This property remembers the result returned by <a href="ContextMenuTool.html#findObjectWithContextMenu">findObjectWithContextMenu</a> if it is a GraphObject.
									This value is passed to <a href="ContextMenuTool.html#showContextMenu">showContextMenu</a> as the second argument.
								The value will be null if the context menu is for the diagram rather than for a particular GraphObject.</p>
								<dl class="tsd-comment-tags">
									<dt>since</dt>
									<dd><p>1.4</p>
									</dd>
								</dl>
							</div>
						</li>
					</ul>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class">
					<a name="defaultTouchContextMenu" class="tsd-anchor"></a>
					<h3>
						default<wbr>Touch<wbr>Context<wbr>Menu
					<span class="tsd-signature-symbol">: </span><a href="Adornment.html" class="tsd-signature-type" data-tsd-kind="Class">Adornment</a><span class="tsd-signature-symbol"> | </span><a href="HTMLInfo.html" class="tsd-signature-type" data-tsd-kind="Class">HTMLInfo</a>        </h3>
					<ul class="tsd-descriptions">
						<li class="tsd-description">
							<div class="tsd-comment tsd-typography">
								<p>Gets or sets the HTMLInfo or Adornment that acts as the default touch context menu.
								On touch devices, this context menu will appear even there is no context menu defined.</p>
								<p>You can disable this functionality by setting this property to null.</p>
								<p>By default shows a set of HTML elements acting as a context menu.</p>
								<dl class="tsd-comment-tags">
									<dt>since</dt>
									<dd><p>1.7</p>
									</dd>
								</dl>
							</div>
						</li>
					</ul>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-get-signature tsd-parent-kind-class">
					<a name="mouseDownPoint" class="tsd-anchor"></a>
					<h3>
						<span class="tsd-flag ts-flagReadOnly">Read-only</span>
						mouse<wbr>Down<wbr>Point
					<span class="tsd-signature-symbol">: </span><a href="Point.html" class="tsd-signature-type" data-tsd-kind="Class">Point</a>        </h3>
					<ul class="tsd-descriptions">
						<li class="tsd-description">
							<div class="tsd-comment tsd-typography">
								<p>This read-only property returns the original mouse-down point in document coordinates.</p>
							</div>
						</li>
					</ul>
				</section>
			</section>
			<section class="tsd-panel-group tsd-member-group ">
				<h2>Methods</h2>
				<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-overwrite">
					<a name="canStart" class="tsd-anchor"></a>
					<h3>
						<span class="tsd-flag ts-flagOverride">Override</span> <span class="tsd-flag ts-flagVirtual">Virtual</span>
						can<wbr>Start
					</h3>
					<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-overwrite">
						<li class="tsd-signature tsd-kind-icon">can<wbr>Start<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li>
					</ul>
					<ul class="tsd-descriptions">
						<li class="tsd-description">
							<div class="tsd-comment tsd-typography">
								<p>Return true if it&#39;s a single mouse right click that hasn&#39;t moved <a href="Tool.html#isBeyondDragSize">Tool.isBeyondDragSize</a>
									and that is on a <a href="GraphObject.html">GraphObject</a> with a <a href="GraphObject.html#contextMenu">GraphObject.contextMenu</a>.
									This is also true if the mouse right click is in the diagram background
								and the diagram&#39;s <a href="Diagram.html#contextMenu">Diagram.contextMenu</a> is non-null.</p>
								<p>On touch devices, a special default context menu will appear even if no object with a context menu is found.</p>
								<p>This method may be overridden.
								Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</p>
							</div>
							<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4>
						</li>
					</ul>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-overwrite">
					<a name="doActivate" class="tsd-anchor"></a>
					<h3>
						<span class="tsd-flag ts-flagOverride">Override</span>
						do<wbr>Activate
					</h3>
					<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-overwrite">
						<li class="tsd-signature tsd-kind-icon">do<wbr>Activate<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
					</ul>
					<ul class="tsd-descriptions">
						<li class="tsd-description">
							<div class="tsd-comment tsd-typography">
								<p>Do nothing, activation is special and relies on doMouseUp</p>
							</div>
							<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
						</li>
					</ul>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-overwrite">
					<a name="doMouseDown" class="tsd-anchor"></a>
					<h3>
						<span class="tsd-flag ts-flagOverride">Override</span>
						do<wbr>Mouse<wbr>Down
					</h3>
					<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-overwrite">
						<li class="tsd-signature tsd-kind-icon">do<wbr>Mouse<wbr>Down<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
					</ul>
					<ul class="tsd-descriptions">
						<li class="tsd-description">
							<div class="tsd-comment tsd-typography">
								<p>Activate this but also execute the normal behavior that would happen on a mouse-up
									if this tool is in the <a href="ToolManager.html#mouseDownTools">ToolManager.mouseDownTools</a> list.
								Perform <a href="ActionTool.html#doMouseDown">ActionTool.doMouseDown</a> if a ContextMenuButton was hit.</p>
							</div>
							<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
						</li>
					</ul>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-overwrite">
					<a name="doMouseMove" class="tsd-anchor"></a>
					<h3>
						<span class="tsd-flag ts-flagOverride">Override</span>
						do<wbr>Mouse<wbr>Move
					</h3>
					<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-overwrite">
						<li class="tsd-signature tsd-kind-icon">do<wbr>Mouse<wbr>Move<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
					</ul>
					<ul class="tsd-descriptions">
						<li class="tsd-description">
							<div class="tsd-comment tsd-typography">
								<p>Handle mouse-enter, mouse-over, and mouse-leave events, as well as tooltips.</p>
							</div>
							<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
						</li>
					</ul>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-overwrite">
					<a name="doMouseUp" class="tsd-anchor"></a>
					<h3>
						<span class="tsd-flag ts-flagOverride">Override</span>
						do<wbr>Mouse<wbr>Up
					</h3>
					<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-overwrite">
						<li class="tsd-signature tsd-kind-icon">do<wbr>Mouse<wbr>Up<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
					</ul>
					<ul class="tsd-descriptions">
						<li class="tsd-description">
							<div class="tsd-comment tsd-typography">
								<p>If there is something found by <a href="ContextMenuTool.html#findObjectWithContextMenu">findObjectWithContextMenu</a>,
									call <a href="ContextMenuTool.html#showContextMenu">showContextMenu</a> with that object&#39;s <a href="GraphObject.html#contextMenu">GraphObject.contextMenu</a>
								or the <a href="Diagram.html#contextMenu">Diagram.contextMenu</a>.</p>
								<p>Once a context menu is being shown,
									if a click occurs on a part of the context menu, call <a href="Tool.html#standardMouseClick">Tool.standardMouseClick</a>.
									Otherwise if the click occurs elsewhere, just stop this tool.
								Unlike most tools, the first mouse-up should not stop this tool.</p>
							</div>
							<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
						</li>
					</ul>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
					<a name="findObjectWithContextMenu" class="tsd-anchor"></a>
					<h3>
						<span class="tsd-flag ts-flagVirtual">Virtual</span>
						find<wbr>Object<wbr>With<wbr>Context<wbr>Menu
					</h3>
					<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
						<li class="tsd-signature tsd-kind-icon">find<wbr>Object<wbr>With<wbr>Context<wbr>Menu<span class="tsd-signature-symbol">(</span>obj<span class="tsd-signature-symbol">?: </span><a href="GraphObject.html" class="tsd-signature-type" data-tsd-kind="Class">GraphObject</a><span class="tsd-signature-symbol"> | </span><a href="Diagram.html" class="tsd-signature-type" data-tsd-kind="Class">Diagram</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="GraphObject.html" class="tsd-signature-type" data-tsd-kind="Class">GraphObject</a><span class="tsd-signature-symbol"> | </span><a href="Diagram.html" class="tsd-signature-type" data-tsd-kind="Class">Diagram</a></li>
					</ul>
					<ul class="tsd-descriptions">
						<li class="tsd-description">
							<div class="tsd-comment tsd-typography">
								<p>Find a <a href="GraphObject.html">GraphObject</a> at the current mouse point with a <a href="GraphObject.html#contextMenu">GraphObject.contextMenu</a>,
								or return the <a href="Diagram.html">Diagram</a> if there is a <a href="Diagram.html#contextMenu">Diagram.contextMenu</a>.</p>
								<p>This method may be overridden.
								Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</p>
							</div>
							<h4 class="tsd-parameters-title">Parameters</h4>
							<ul class="tsd-parameters">
								<li>
									<h5><span class="tsd-flag ts-flagOptional">Optional</span> obj: <a href="GraphObject.html" class="tsd-signature-type" data-tsd-kind="Class">GraphObject</a><span class="tsd-signature-symbol"> | </span><a href="Diagram.html" class="tsd-signature-type" data-tsd-kind="Class">Diagram</a></h5>
									<div class="tsd-comment tsd-typography">
										<p>Optional GraphObject with which to start searching for a context menu.
										If null, the Diagram will be used. If no argument is specified, this method will look for an object at the current mouse point.</p>
									</div>
								</li>
							</ul>
							<h4 class="tsd-returns-title">Returns <a href="GraphObject.html" class="tsd-signature-type" data-tsd-kind="Class">GraphObject</a><span class="tsd-signature-symbol"> | </span><a href="Diagram.html" class="tsd-signature-type" data-tsd-kind="Class">Diagram</a></h4>
							<p>something with a <code>contextMenu</code>,
							or null if nothing can be found with a context menu at the current mouse point.</p>
						</li>
					</ul>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
					<a name="hideContextMenu" class="tsd-anchor"></a>
					<h3>
						<span class="tsd-flag ts-flagVirtual">Virtual</span>
						hide<wbr>Context<wbr>Menu
					</h3>
					<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
						<li class="tsd-signature tsd-kind-icon">hide<wbr>Context<wbr>Menu<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
					</ul>
					<ul class="tsd-descriptions">
						<li class="tsd-description">
							<div class="tsd-comment tsd-typography">
								<p>Hide any context menu.</p>
								<p>This method may be overridden.
								Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</p>
							</div>
							<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
						</li>
					</ul>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
					<a name="hideDefaultContextMenu" class="tsd-anchor"></a>
					<h3>
						<span class="tsd-flag ts-flagVirtual">Virtual</span>
						hide<wbr>Default<wbr>Context<wbr>Menu
					</h3>
					<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
						<li class="tsd-signature tsd-kind-icon">hide<wbr>Default<wbr>Context<wbr>Menu<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
					</ul>
					<ul class="tsd-descriptions">
						<li class="tsd-description">
							<div class="tsd-comment tsd-typography">
								<p>This is the <a href="HTMLInfo.html#hide">HTMLInfo.hide</a> method for the <a href="ContextMenuTool.html#defaultTouchContextMenu">defaultTouchContextMenu</a>.</p>
								<p>This method may be overridden.
									Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a>
								for how to override methods and how to call this base method.</p>
							</div>
							<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
						</li>
					</ul>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
					<a name="positionContextMenu" class="tsd-anchor"></a>
					<h3>
						<span class="tsd-flag ts-flagVirtual">Virtual</span>
						position<wbr>Context<wbr>Menu
					</h3>
					<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
						<li class="tsd-signature tsd-kind-icon">position<wbr>Context<wbr>Menu<span class="tsd-signature-symbol">(</span>contextmenu<span class="tsd-signature-symbol">: </span><a href="Adornment.html" class="tsd-signature-type" data-tsd-kind="Class">Adornment</a>, obj<span class="tsd-signature-symbol">: </span><a href="GraphObject.html" class="tsd-signature-type" data-tsd-kind="Class">GraphObject</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
					</ul>
					<ul class="tsd-descriptions">
						<li class="tsd-description">
							<div class="tsd-comment tsd-typography">
								<p>This is called by <a href="ContextMenuTool.html#showContextMenu">showContextMenu</a> to position the context menu within the viewport.
									It normally goes just below the cursor.
									But if the mouse is too close to the right edge or the bottom edge of the viewport,
								it is positioned left and/or above the cursor.</p>
								<p>This method only operates if the context menu, an <a href="Adornment.html">Adornment</a>, does not have a <a href="Adornment.html#placeholder">Adornment.placeholder</a>.
									When there is a <a href="Placeholder.html">Placeholder</a> in the context menu, that Adornment is automatically positioned
								so that the Placeholder is positioned at the adorned object, the second argument to this method.</p>
								<p>This method may be overridden.
								Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</p>
								<p>If you override this method to position the context menu,
									the context menu has already been measured but not arranged,
									so you can use its <a href="GraphObject.html#measuredBounds">GraphObject.measuredBounds</a> width and height
								but not its <a href="GraphObject.html#actualBounds">GraphObject.actualBounds</a>.</p>
							</div>
							<h4 class="tsd-parameters-title">Parameters</h4>
							<ul class="tsd-parameters">
								<li>
									<h5>contextmenu: <a href="Adornment.html" class="tsd-signature-type" data-tsd-kind="Class">Adornment</a></h5>
								</li>
								<li>
									<h5>obj: <a href="GraphObject.html" class="tsd-signature-type" data-tsd-kind="Class">GraphObject</a></h5>
									<div class="tsd-comment tsd-typography">
										<p>The <a href="GraphObject.html">GraphObject</a> getting the context menu,
										or null if the context menu is for the diagram background.</p>
									</div>
								</li>
							</ul>
							<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
						</li>
					</ul>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
					<a name="showContextMenu" class="tsd-anchor"></a>
					<h3>
						<span class="tsd-flag ts-flagVirtual">Virtual</span>
						show<wbr>Context<wbr>Menu
					</h3>
					<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
						<li class="tsd-signature tsd-kind-icon">show<wbr>Context<wbr>Menu<span class="tsd-signature-symbol">(</span>contextmenu<span class="tsd-signature-symbol">: </span><a href="Adornment.html" class="tsd-signature-type" data-tsd-kind="Class">Adornment</a><span class="tsd-signature-symbol"> | </span><a href="HTMLInfo.html" class="tsd-signature-type" data-tsd-kind="Class">HTMLInfo</a>, obj<span class="tsd-signature-symbol">: </span><a href="GraphObject.html" class="tsd-signature-type" data-tsd-kind="Class">GraphObject</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
					</ul>
					<ul class="tsd-descriptions">
						<li class="tsd-description">
							<div class="tsd-comment tsd-typography">
								<p>Show an <a href="Adornment.html">Adornment</a> or <a href="HTMLInfo.html">HTMLInfo</a> as a context menu.</p>
								<p>This method is called by the context click (<a href="Tool.html#doMouseDown">Tool.doMouseDown</a>) and <a href="CommandHandler.html#showContextMenu">CommandHandler.showContextMenu</a>.
									If you want to programmatically show a context menu for a particular GraphObject or for the
									whole diagram, do not call this method, which only does one small piece of the process of
									bringing up a context menu.
									Instead call <a href="CommandHandler.html#showContextMenu">CommandHandler.showContextMenu</a>, which will start this tool
								and eventually call this method and handle additional input events.</p>
								<p>For <a href="Adornment.html">Adornment</a> context menus: If the object&#39;s containing <a href="Part.html">Part</a> is data-bound,
									this sets the contextmenu&#39;s <code>Part.data</code> to the same value.
								The <a href="Adornment.html#adornedObject">Adornment.adornedObject</a> property is set to the <a href="GraphObject.html">GraphObject</a> for which the menu is being shown.</p>
								<p>This method sets the <a href="ContextMenuTool.html#currentContextMenu">currentContextMenu</a>.</p>
								<p>This method may be overridden.
								Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</p>
							</div>
							<h4 class="tsd-parameters-title">Parameters</h4>
							<ul class="tsd-parameters">
								<li>
									<h5>contextmenu: <a href="Adornment.html" class="tsd-signature-type" data-tsd-kind="Class">Adornment</a><span class="tsd-signature-symbol"> | </span><a href="HTMLInfo.html" class="tsd-signature-type" data-tsd-kind="Class">HTMLInfo</a></h5>
								</li>
								<li>
									<h5>obj: <a href="GraphObject.html" class="tsd-signature-type" data-tsd-kind="Class">GraphObject</a></h5>
									<div class="tsd-comment tsd-typography">
										<p>the <a href="GraphObject.html">GraphObject</a> for which the context menu is being shown;
										this is null if the contextmenu is being shown for the diagram background.</p>
									</div>
								</li>
							</ul>
							<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
						</li>
					</ul>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
					<a name="showDefaultContextMenu" class="tsd-anchor"></a>
					<h3>
						<span class="tsd-flag ts-flagVirtual">Virtual</span>
						show<wbr>Default<wbr>Context<wbr>Menu
					</h3>
					<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
						<li class="tsd-signature tsd-kind-icon">show<wbr>Default<wbr>Context<wbr>Menu<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
					</ul>
					<ul class="tsd-descriptions">
						<li class="tsd-description">
							<div class="tsd-comment tsd-typography">
								<p>This is the <a href="HTMLInfo.html#show">HTMLInfo.show</a> method for the <a href="ContextMenuTool.html#defaultTouchContextMenu">defaultTouchContextMenu</a>.</p>
								<p>If the object&#39;s containing <a href="Part.html">Part</a> is data-bound,
									set the contextmenu&#39;s <code>Part.data</code> to the same value.
									The <a href="Adornment.html#adornedObject">Adornment.adornedObject</a> property is set to the <a href="GraphObject.html">GraphObject</a>
								for which the menu is being shown.</p>
								<p>The menu carries some default CSS styling and uses the following CSS classes:</p>
								<ul>
									<li><code>goCXforeground</code> for the DIV containing the buttons</li>
									<li><code>goCXbackground</code> for the darker DIV behind the context menu</li>
									<li><code>goCXul</code> for the HTML <code>ul</code> items</li>
									<li><code>goCXli</code> for the HTML <code>li</code> tag items</li>
									<li><code>goCXa</code> for the HTML <code>a</code> tag items</li>
								</ul>
								<p>This method may be overridden.
									Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a>
								for how to override methods and how to call this base method.</p>
							</div>
							<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
						</li>
					</ul>
				</section>
			</section>
		</div>
		<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
			<nav class="tsd-navigation primary">
				<ul>
					<li class=" ">
						<a href="../index.html">GoJS <wbr>Class <wbr>Index</a>
					</li>
				</ul>
			</nav>
			<nav class="tsd-navigation secondary menu-sticky">
				<ul class="before-current">
				</ul>
				<ul class="current">
					<li class="current tsd-kind-class">
						<a href="ContextMenuTool.html" class="tsd-kind-icon">Context<wbr>Menu<wbr>Tool</a>
						<ul>
							<li class=" tsd-kind-constructor tsd-parent-kind-class tsd-is-overwrite">
								<a href="ContextMenuTool.html#constructor" class="tsd-kind-icon">constructor</a>
							</li>
							<li class=" tsd-kind-accessor tsd-parent-kind-class">
								<a href="ContextMenuTool.html#currentContextMenu" class="tsd-kind-icon">current<wbr>Context<wbr>Menu</a>
							</li>
							<li class=" tsd-kind-accessor tsd-parent-kind-class">
								<a href="ContextMenuTool.html#currentObject" class="tsd-kind-icon">current<wbr>Object</a>
							</li>
							<li class=" tsd-kind-accessor tsd-parent-kind-class">
								<a href="ContextMenuTool.html#defaultTouchContextMenu" class="tsd-kind-icon">default<wbr>Touch<wbr>Context<wbr>Menu</a>
							</li>
							<li class=" tsd-kind-get-signature tsd-parent-kind-class">
								<a href="ContextMenuTool.html#mouseDownPoint" class="tsd-kind-icon">mouse<wbr>Down<wbr>Point</a>
							</li>
							<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-overwrite">
								<a href="ContextMenuTool.html#canStart" class="tsd-kind-icon">can<wbr>Start</a>
							</li>
							<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-overwrite">
								<a href="ContextMenuTool.html#doActivate" class="tsd-kind-icon">do<wbr>Activate</a>
							</li>
							<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-overwrite">
								<a href="ContextMenuTool.html#doMouseDown" class="tsd-kind-icon">do<wbr>Mouse<wbr>Down</a>
							</li>
							<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-overwrite">
								<a href="ContextMenuTool.html#doMouseMove" class="tsd-kind-icon">do<wbr>Mouse<wbr>Move</a>
							</li>
							<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-overwrite">
								<a href="ContextMenuTool.html#doMouseUp" class="tsd-kind-icon">do<wbr>Mouse<wbr>Up</a>
							</li>
							<li class=" tsd-kind-method tsd-parent-kind-class">
								<a href="ContextMenuTool.html#findObjectWithContextMenu" class="tsd-kind-icon">find<wbr>Object<wbr>With<wbr>Context<wbr>Menu</a>
							</li>
							<li class=" tsd-kind-method tsd-parent-kind-class">
								<a href="ContextMenuTool.html#hideContextMenu" class="tsd-kind-icon">hide<wbr>Context<wbr>Menu</a>
							</li>
							<li class=" tsd-kind-method tsd-parent-kind-class">
								<a href="ContextMenuTool.html#hideDefaultContextMenu" class="tsd-kind-icon">hide<wbr>Default<wbr>Context<wbr>Menu</a>
							</li>
							<li class=" tsd-kind-method tsd-parent-kind-class">
								<a href="ContextMenuTool.html#positionContextMenu" class="tsd-kind-icon">position<wbr>Context<wbr>Menu</a>
							</li>
							<li class=" tsd-kind-method tsd-parent-kind-class">
								<a href="ContextMenuTool.html#showContextMenu" class="tsd-kind-icon">show<wbr>Context<wbr>Menu</a>
							</li>
							<li class=" tsd-kind-method tsd-parent-kind-class">
								<a href="ContextMenuTool.html#showDefaultContextMenu" class="tsd-kind-icon">show<wbr>Default<wbr>Context<wbr>Menu</a>
							</li>
						</ul>
					</li>
				</ul>
				<ul class="after-current">
				</ul>
			</nav>
		</div>
	</div>
</div>
<div class="tsd w-full max-w-screen-xl mx-auto px-2">
	<div class="bottom-copyright">Copyright &copy; 1998-2021 by Northwoods Software Corporation.</div>
</div>
<div class="overlay"></div>
<script src="../assets/js/main.js"></script>
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-1506307-5"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date()); gtag('config', 'UA-1506307-5');
  var getOutboundLink = function(url, label) {
    gtag('event', 'click', {
      'event_category': 'outbound',
      'event_label': label,
      'transport_type': 'beacon'
    });
  }

  // topnav
  var topButton = document.getElementById("topnavButton");
  var topnavList = document.getElementById("topnavList");
  topButton.addEventListener("click", function() {
    this.classList.toggle("active");
    topnavList.classList.toggle("hidden");
    document.getElementById("topnavOpen").classList.toggle("hidden");
    document.getElementById("topnavClosed").classList.toggle("hidden");
  });
</script>
</body>
</html>